import request from '@/utils/request'
import { randomString } from '@/utils/auth'

export function login(LoginName, Password) {
  var input = {
    LoginName,
    Password
  }
  input.RandomKey = randomString(32)
  return request({
    url: '/api/Auth/Authentication',
    method: 'post',
    data: { input }
  })
}

export function getInfo(token) {
  var input = { token }
  return request({
    url: '/api/Auth/info',
    method: 'post',
    data: { input }
  })
}
export function logout(token) {
  var input = { token }
  return request({
    url: '/api/Auth/logout',
    method: 'post',
    data: { input }
  })
}
